define(['./js/swiper.min.js', './js/validator.min.js'], function () {
    return {
        toggleBar: function (showID, hideID1, hideID2) {
            $("#" + hideID1).hide();
            $("#" + hideID2).hide();
            $("#" + showID).show();
        },

        toggleBox: function (showID, hideID1, hideID2) {
            $("#" + hideID1).hide();
            $("#" + hideID2).hide();
            $("#" + showID).show();
        },

        addActive: function (addID, removeID1, removeID2) {
            $("#" + removeID1).parent().removeClass("active");
            $("#" + removeID2).parent().removeClass("active");
            $("#" + addID).parent().addClass("active");
        },

        showDropdownMenu: function (showID, hideID) {
            $("#" + showID).on("mouseenter", function () {
                // console.log("mouseenter work");
                $("#" + hideID).show();
            });
            $("#" + showID).on("mouseleave", function () {
                $("#" + hideID).hide();
            });
        },

        popClose: function () {
            $(".popWindow").hide();
            $(this).hide();
        },

        swiper: function () {
            $(document).ready(function () {
                var mySwiper = new Swiper('.swiper-container', {
                    direction: 'horizontal',
                    loop: true,
                    pagination: '.swiper-pagination',
                    nextButton: '.swiper-button-next',
                    prevButton: '.swiper-button-prev',
                    autoplay: 6000
                })
            })
        },

        formValidate: function () {
            $('#form-validate').validator();
        },

        getAuditcode: function () {
            $("#getAuditcode").on("click", function () {
                $(this).addClass("disabled");
                var t = setTimeout(function () {
                    $("#getAuditcode").removeClass("disabled")
                }, 60000);
            });
        }

    };
});
